package com.cl.core.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cl.core.pojo.PlatformUsers;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author liddhappy
 * @description user mapper
 * @createTime 2022/12/4 11:01
 */
@Mapper
public interface PlatformUserMapper extends BaseMapper<PlatformUsers> {
    /**
     * 删除user
     *
     * @param userId
     * @return
     */
    void deleteByPrimaryKey(Long userId);
    /**
     * 添加user
     *
     * @return
     */
    int insert(PlatformUsers record);

    /**
     * 非空添加
     * @param record
     * @return
     */
    int insertSelective(PlatformUsers record);

    /**
     * 查询user
     * @param userId
     * @return
     */
    PlatformUsers selectByPrimaryKey(Long userId);

    /**
     * 非空更新user
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(PlatformUsers record);

    /**
     * 更新
     * @param record
     * @return
     */
    int updateByPrimaryKey(PlatformUsers record);

    /**
     * 查找分页内容
     * @param page 页面
     * @param query 查询对象
     * @return  user 对象
     */
    IPage<PlatformUsers> paging(Page page, @Param("query") PlatformUsers query);
}